package com.three.crm.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {

    public static String getTime(long time){
        SimpleDateFormat format = new SimpleDateFormat(
                "yyyy-MM-dd hh:mm:ss");
        return format.format(time);
    }

    public static String getToday(){
        SimpleDateFormat format = new SimpleDateFormat(
                "yyyy-MM-dd");
        return format.format(new Date(System.currentTimeMillis()));
    }

    public static String getDateByTime(long time){
        SimpleDateFormat format = new SimpleDateFormat(
                "yyyy-MM-dd");
        return format.format(new Date(time));
    }
}
